<!DOCTYPE HTML>
<html>
<head lang="zh-CN">
     <meta charset="UTF-8">
    <title>设置</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- 设置初始缩放比例为1.0，使用设备宽度  -->
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <!-- 在iOS下开启全屏模式  -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- 隐藏 Sarafi 状态栏  -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link href="../../css/wapReset.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="../../css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/personal.css">
    <script src="../../js/jquery.rem.min.js"></script>
    <script src="../../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
    <style>
    	.content{
    		padding-top:2.9rem;
    	}
    	.content li{
    		height:2.65rem;
			line-height: 2.65rem;
			font-size: 0.55rem;
			color:#333;
			font-weight: bold;
			text-indent: 0.8rem;
			margin-bottom:0;
			border-bottom:0.083rem solid #eee;
			background:white;
			letter-spacing: 0.043rem;
			position: relative;
    	}
    	.content li:after{
    		content:"";
			width:0.26rem;
			height:0.456rem;
			position: absolute;
			top:50%;
			right:1rem;
			margin-top:-0.228rem;
			background:url("../../img/personalImg/right.png") no-repeat;
			background-size: 100%;
			background-position: 0;
    	}
    	button{
    		display: block;
    		margin:4rem auto;
    		width:12rem;
    		height:1.9rem;
    		background:#FF6B60;
    		color:white;
    	}
    </style>
</head>
<body>
<header class="mui-bar mui-bar-nav message_head">
	<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title">设 置</h1>
</header>	
<div id="mainBox"> 
  <div class="content">
    <ul>
    	<li class="cache">清除缓存<i class="M" style="display: inline-block;height:100%;line-height:2.65rem;font-size: 0.55rem;margin-left:0.4rem;font-weight: normal ;"></i></li>
    	<li>检查更新</li>
    	<li class="aboutUs">关于我们</li>
    	<li class="userAgg">用户隐私协议与隐私条款</li>
    	<!--<button id="exitLogin">退出登录</button>-->
    </ul>
  </div>
</div>
</body>
<script>
	
	mui.plusReady(function() {
		
		plus.cache.calculate(function(size) {
	        console.log(size)
	        sizeCache = size;
	        document.getElementsByClassName("M")[0].innerHTML=parseFloat(sizeCache / (1024 * 1024)).toFixed(2)+"MB"
	   	});
		
		
		document.getElementsByClassName("cache")[0].addEventListener('tap', function() {
			plus.cache.calculate(function(size) {
	        console.log(size)
	        sizeCache = size;
	        mui.confirm("您目前的系统缓存为" + parseFloat(sizeCache / (1024 * 1024)).toFixed(2) + "M？", "清除缓存", ["确认", "取消"], function(e) {
	            if(e.index == 1) {} else {
	                plus.cache.clear(function() {
	                    alert("缓存清除完毕")
	                    document.getElementsByClassName("M")[0].innerHTML=parseFloat(sizeCache / (1024 * 1024)).toFixed(2)+"MB"
	                });
	                }
	            });
	   		});
		});
	    mui.init()
		document.getElementsByClassName('aboutUs')[0].addEventListener('tap', function() {
		  mui.openWindow({
		    url: 'aboutMe.html', 
		    id:'aboutMe'
		  });
		});
		document.getElementsByClassName('aboutUs')[0].addEventListener('tap', function() {
		  mui.openWindow({
		    url: 'aboutMe.html', 
		    id:'aboutMe'
		  });
		});
		document.getElementsByClassName('userAgg')[0].addEventListener('tap', function() {
		  mui.openWindow({
		    url: 'userAgg.html', 
		    id:'userAgg'
		  });
		});
		document.getElementsByClassName('aboutUs')[0].addEventListener('tap', function() {
		  mui.openWindow({
		    url: 'aboutMe.html', 
		    id:'aboutMe'
		  });
		});
		document.getElementById("exitLogin").addEventListener('tap', function() {
		  mui.openWindow({
		    url: 'weixinLogin.html', 
		    id:'weixinLogin'
		  });
		});
    
  })
</script>
</html>